package android.tusnotas.beans;

import java.util.ArrayList;
import java.util.List;

public class Instance {

	private Integer id;
	private String description;
	private List<Course> courses;
	
	public Instance(){
		super();
		this.setCourses(new ArrayList<Course>());
	}
	
	public Instance(String description) {
		super();
		this.description = description;
		this.setCourses(new ArrayList<Course>());
	}
	
	public Instance(Integer id, String description) {
		super();
		this.id = id;
		this.description = description;
		this.setCourses(new ArrayList<Course>());
	}
	
	public CharSequence getShortDescription(){
		return this.description.replace("Cuatrimestre", "Cuatri").replace("Cursada Regular - ", "").replace("Presenciales", "Pres.");
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setCourses(List<Course> courses) {
		this.courses = courses;
	}

	public List<Course> getCourses() {
		return courses;
	}
	
	public void addCourse(Course course){
		this.courses.add(course);
	}
}
